/* USER CODE BEGIN Header */
/**
  ******************************************************************************
  * @file           : main.h
  * @brief          : Header for main.c file.
  *                   This file contains the common defines of the application.
  ******************************************************************************
  * @attention
  *
  * Copyright (c) 2022 STMicroelectronics.
  * All rights reserved.
  *
  * This software is licensed under terms that can be found in the LICENSE file
  * in the root directory of this software component.
  * If no LICENSE file comes with this software, it is provided AS-IS.
  *
  ******************************************************************************
  */
/* USER CODE END Header */

/* Define to prevent recursive inclusion -------------------------------------*/
#ifndef __MAIN_H
#define __MAIN_H

#ifdef __cplusplus
extern "C" {
#endif

/* Includes ------------------------------------------------------------------*/
#include "stm32g0xx_hal.h"

#include "stm32g0xx_ll_dma.h"
#include "stm32g0xx_ll_rcc.h"
#include "stm32g0xx_ll_bus.h"
#include "stm32g0xx_ll_system.h"
#include "stm32g0xx_ll_exti.h"
#include "stm32g0xx_ll_cortex.h"
#include "stm32g0xx_ll_utils.h"
#include "stm32g0xx_ll_pwr.h"
#include "stm32g0xx_ll_ucpd.h"
#include "stm32g0xx_ll_usart.h"
#include "stm32g0xx_ll_gpio.h"

/* Private includes ----------------------------------------------------------*/
/* USER CODE BEGIN Includes */

/* USER CODE END Includes */

/* Exported types ------------------------------------------------------------*/
/* USER CODE BEGIN ET */

/* USER CODE END ET */

/* Exported constants --------------------------------------------------------*/
/* USER CODE BEGIN EC */

/* USER CODE END EC */

/* Exported macro ------------------------------------------------------------*/
/* USER CODE BEGIN EM */

/* USER CODE END EM */

/* Exported functions prototypes ---------------------------------------------*/
void Error_Handler(void);

/* USER CODE BEGIN EFP */

/* USER CODE END EFP */

/* Private defines -----------------------------------------------------------*/
#define BUS_I2C_INSTANCE I2C2
#define TCPP0X_HANDLE_I2C hi2c2
#define UCSI_HANDLE_I2C hi2c1
#define HANDLE_I2C_GENERATED 1
#define USBPD_FW_VERSION 0x20220602
#define MX_I2C_UCSI_HANDLE_INIT MX_I2C1_Init
#define MX_I2C_TCPP03_HANDLE_INIT MX_I2C2_Init
#define VBUS_MEAS_Pin GPIO_PIN_7
#define VBUS_MEAS_GPIO_Port GPIOA
#define ISENSE_MEAS_TCPP03_Pin GPIO_PIN_0
#define ISENSE_MEAS_TCPP03_GPIO_Port GPIOB
#define USBC_TCPP03_FLG_Pin GPIO_PIN_6
#define USBC_TCPP03_FLG_GPIO_Port GPIOC
#define USBC_TCPP03_FLG_EXTI_IRQn EXTI4_15_IRQn
#define TCPP03_I2C2_SCL_Pin GPIO_PIN_11
#define TCPP03_I2C2_SCL_GPIO_Port GPIOA
#define TCPP03_I2C2_SDA_Pin GPIO_PIN_12
#define TCPP03_I2C2_SDA_GPIO_Port GPIOA
#define USBC_TCPP03_EN_Pin GPIO_PIN_0
#define USBC_TCPP03_EN_GPIO_Port GPIOD
#define STM32G0_WAKE_Pin GPIO_PIN_3
#define STM32G0_WAKE_GPIO_Port GPIOD
#define STM32G0_INTN_Pin GPIO_PIN_8
#define STM32G0_INTN_GPIO_Port GPIOB
#define STM32G0_INTN_EXTI_IRQn EXTI4_15_IRQn
void   MX_GPIO_Init(void);
void   MX_I2C1_Init(void);
void   MX_I2C2_Init(void);
/* USER CODE BEGIN Private defines */

/* USER CODE END Private defines */

#ifdef __cplusplus
}
#endif

#endif /* __MAIN_H */
